<template>
    <!-- 声明router-view -->
    <el-main>
    <div style="width: 1290px; height: 570px;border: 1px solid red;">
        <router-view></router-view>
    </div>
</el-main>
<!-- 菜单绑定跳转路由 -->
<el-menu-item index="/user/info">
    <el-icon>
        <Management />
    </el-icon>
    <span>用户信息</span>
</el-menu-item>
</template>

<script setup>
import { setxxx, getxxx } from '@/api/xxx.js';
import { ref } from 'vue';
import { useRouter } from 'vue-router'

const router = useRouter();

const list = ref([]);

const getAllxxx = async function () {
    let data = await getxxx();
    list.value = data;
}
getAllxxx();

const confition = ref({
    name: '',
    age: ''
})
const setAllxxx = async function () {
    let data = await setxxx({ ...condition.value });
    list.value = data;
}
// router.push('/') 事件中可以用来跳转用的
</script>